package com.apes.enquiry.compile.impl;

import com.alibaba.fastjson.JSONObject;
import com.apes.enquiry.compile.CompileCode;
import com.apes.enquiry.supplier.baturu.service.BaturuCodingService;
import com.apes.framework.plugin.esb.api.SimpleRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 巴图鲁实现
 * @author wuq
 * @Time 2023-6-11 16:18
 * @Description
 */
@Service
public class BaturuCompileImpl implements CompileCode {

    @Autowired
    private BaturuCodingService baturuCodingService;

    @Override
    public JSONObject queryCarTypeByVin(SimpleRequest request) {
        return baturuCodingService.queryCarTypeByVin(request);
    }

    @Override
    public JSONObject searchPartsHintsInfo(SimpleRequest request) {
        return baturuCodingService.searchPartsHintsInfo(request);
    }

    @Override
    public JSONObject queryPartsCodeInfo(SimpleRequest request) {
        return baturuCodingService.queryPartsCodeInfo(request);
    }

    @Override
    public JSONObject queryPartsReplaceCode(SimpleRequest request) {
        return baturuCodingService.queryPartsReplaceCode(request);
    }

    @Override
    public boolean support(String platformId) {
        return "baturu".equalsIgnoreCase(platformId);
    }
}
